package com.jwsoft.manager.core.dao.mapper;

import com.jwsoft.manager.core.dao.model.EduLivePlace;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwsoft.manager.core.dao.model.EduhLivePlace;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* <p>
  *  Mapper 接口
  * </p>
*
* @author wangtao
* @since 2022-12-28
*/
@Mapper
public interface EduLivePlaceMapper extends BaseMapper<EduLivePlace> {

    /**
     * 根据年度查询居住证数据
     *
     * @param year
     * @param pageSize
     * @return
     */
    List<EduLivePlace> selectByYear(@Param("year") Integer year,@Param("pageSize") Integer pageSize);

    /**
     *查询是否有还需要处理的数据
     * @param year
     * @return
     */
    Integer selectCountByYear(@Param("year") Integer year);

    Integer selectEncryptionCountByYear(@Param("year") Integer year,@Param("taskDetailId") String taskDetailId);

    List<EduhLivePlace> selectEncryptionByYear(@Param("year") Integer year,@Param("taskDetailId") String taskDetailId,@Param("pageSize") Integer pageSize);

    Integer deleteByTaskHistory(@Param("taskDetailId")String taskDetailId);

    List<EduhLivePlace> queryCleanHistoryEnrollWithLivePlace(@Param("year") Integer year,@Param("taskDetailId") String taskDetailId);

    List<String> queryEnrollIdcardByYear(@Param("year") Integer year);

    List<EduhLivePlace> queryCleanLivePlaceByIdcards(@Param("idcards") List<String> idcards);
}
